Skip to main content

dropboxListFolder

Type

command

Summary

Starts returning the contents of a folder.

Syntax

dropboxListFolder <pAccessToken>, <pPath>, <pRecursive>, <pIncludeMediaInfo>, [<pCallback>]

Description

If the result's ListFolderResult.has_more field is true, call list_folder/continue with the returned ListFolderResult.cursor to retrieve more entries.

If you're using ListFolderArg.recursive set to true to keep a local cache of the contents of a Dropbox account, iterate through each entry in order and process them as follows to keep your local state in sync:

  • For each FileMetadata, store the new entry at the given path in your local state. If the required parent folders don't exist yet, create them. If there's already something else at the given path, replace it and remove all its children.
  • For each FolderMetadata, store the new entry at the given path in your local state. If the required parent folders don't exist yet, create them. If there's already something else at the given path, replace it but leave the children as they are. Check the new entry's FolderSharingInfo.read_only and set all its children's read-only statuses to match.
  • For each DeletedMetadata, if your local state has something at the given path, remove it and all its children. If there's nothing at the given path, ignore this entry.

If the callback parameter is not empty the request will be asynchronus and when complete the callback will be sent to the object that accessed the API. The callback will be sent with three parameters:

  • The request ID which will be the value of the it variable after calling the command
  • The HTTP response code
  • The data returned which will be the same data as documented for the it variable in a synchronous request.

Parameters

NameTypeDescription

pAccessToken

An OAuth2 Access token to access the user's account

pPath

Path in the user's Dropbox to be deleted.

pRecursive

If true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders. The default for this field is False.

pIncludeMediaInfo

If true, FileMetadata.media_info is set for photo and video. The default for this field is False.

pCallback

The handler to call when the request is complete. If empty the command will block until complete.